Skip to content

Conversation

@LittleSound
Copy link
Collaborator

@LittleSound LittleSound commented Dec 5, 2025

CleanShot.2025-12-05.at.17.42.04.mp4

@LittleSound LittleSound requested a review from a team as a code owner December 5, 2025 13:53
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 5, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 5, 2025

📝 Walkthrough

Walkthrough

Adds local drag-state tracking and safe wrapper functions in the Vue composable to reliably start and end node dragging. Replaces direct calls to startDrag/endDrag with safeDragStart/safeDragEnd and updates pointer event handlers to coordinate drag lifecycle and selection logic.

Changes

Cohort / File(s) Change Summary
Pointer interaction composable
src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
Adds hasDraggingStarted state. Implements safeDragStart(event, nodeId) (calls startDrag in try/finally and sets hasDraggingStarted = true) and safeDragEnd(event) (calls endDrag with error handling and resets hasDraggingStarted and other drag state). Replaces direct startDrag/endDrag usage with these wrappers in onPointerdown, onPointermove (multi-select path), and onPointerup. Removes immediate layoutStore.isDraggingVueNodes.value = true in the multi-select path and updates onPointerup to consider hasDraggingStarted alongside wasDragging when deciding to call safeDragEnd and whether to early-return.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch rizumu/fix/mouse-accidentally-sticks-and-drag-the-node

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/09/2025, 02:47:18 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

🎭 Playwright Test Results

Some tests failed

⏰ Completed at: 12/09/2025, 02:56:24 AM UTC

📈 Summary

  • Total Tests: 487
  • Passed: 465 ✅
  • Failed: 1 ❌
  • Flaky: 11 ⚠️
  • Skipped: 10 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 456 / ❌ 1 / ⚠️ 11 / ⏭️ 10
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 6 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

Bundle Size Report

Summary

  • Raw size: 17.1 MB baseline 17.1 MB — 🔴 +318 B
  • Gzip: 3.38 MB baseline 3.38 MB — 🔴 +18 B
  • Brotli: 2.59 MB baseline 2.59 MB — 🟢 -98 B
  • Bundles: 97 current • 97 baseline • 37 added / 37 removed

Category Glance
Graph Workspace 🔴 +318 B (979 kB) · Vendor & Third-Party ⚪ 0 B (8.56 MB) · Other ⚪ 0 B (3.81 MB) · App Entry Points ⚪ 0 B (3.21 MB) · Panels & Settings ⚪ 0 B (298 kB) · UI Components ⚪ 0 B (177 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.21 MB (baseline 3.21 MB) • ⚪ 0 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-D55Bel3F.js (new) 2.98 MB 🔴 +2.98 MB 🔴 +621 kB 🔴 +472 kB
assets/index-DYHbMWED.js (removed) 2.98 MB 🟢 -2.98 MB 🟢 -621 kB 🟢 -472 kB
assets/index-BfWaoYDX.js (new) 223 kB 🔴 +223 kB 🔴 +47.6 kB 🔴 +39.3 kB
assets/index-BtY1zRG1.js (removed) 223 kB 🟢 -223 kB 🟢 -47.6 kB 🟢 -39.2 kB
assets/index-B32ieljX.js (new) 345 B 🔴 +345 B 🔴 +245 B 🔴 +202 B
assets/index-Dktf7iws.js (removed) 345 B 🟢 -345 B 🟢 -244 B 🟢 -241 B

Status: 3 added / 3 removed

Graph Workspace — 979 kB (baseline 978 kB) • 🔴 +318 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-B2X7O2St.js (new) 979 kB 🔴 +979 kB 🔴 +189 kB 🔴 +144 kB
assets/GraphView-Bw2UMx-X.js (removed) 978 kB 🟢 -978 kB 🟢 -189 kB 🟢 -144 kB

Status: 1 added / 1 removed

Views & Navigation — 6.54 kB (baseline 6.54 kB) • ⚪ 0 B

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-Bozh5Fw1.js (new) 6.54 kB 🔴 +6.54 kB 🔴 +2.14 kB 🔴 +1.9 kB
assets/UserSelectView-lbxzJNyO.js (removed) 6.54 kB 🟢 -6.54 kB 🟢 -2.14 kB 🟢 -1.9 kB

Status: 1 added / 1 removed

Panels & Settings — 298 kB (baseline 298 kB) • ⚪ 0 B

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/CreditsPanel-B6x04_bn.js (new) 21.4 kB 🔴 +21.4 kB 🔴 +5.15 kB 🔴 +4.5 kB
assets/CreditsPanel-DPNZUdCP.js (removed) 21.4 kB 🟢 -21.4 kB 🟢 -5.15 kB 🟢 -4.5 kB
assets/KeybindingPanel-2Dqv-wr6.js (new) 13.6 kB 🔴 +13.6 kB 🔴 +3.42 kB 🔴 +3.01 kB
assets/KeybindingPanel-xCOPtfPf.js (removed) 13.6 kB 🟢 -13.6 kB 🟢 -3.42 kB 🟢 -3.01 kB
assets/ExtensionPanel-Cordrj7j.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.57 kB 🔴 +2.26 kB
assets/ExtensionPanel-nxB-6hbn.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.58 kB 🟢 -2.26 kB
assets/AboutPanel-BL-vXZcq.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/AboutPanel-wxnRyPKb.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/ServerConfigPanel-B_YvDXza.js (new) 6.56 kB 🔴 +6.56 kB 🔴 +1.83 kB 🔴 +1.63 kB
assets/ServerConfigPanel-DYKTD8kI.js (removed) 6.56 kB 🟢 -6.56 kB 🟢 -1.83 kB 🟢 -1.63 kB
assets/UserPanel-5eoeIXRW.js (new) 6.23 kB 🔴 +6.23 kB 🔴 +1.72 kB 🔴 +1.5 kB
assets/UserPanel-Cc7ue24b.js (removed) 6.23 kB 🟢 -6.23 kB 🟢 -1.72 kB 🟢 -1.51 kB
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BXTtSH4O.js 33.3 kB 33.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C9Pzn-NG.js 25.2 kB 25.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CCy2fA_h.js 27.3 kB 27.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CQpqEFfl.js 26.6 kB 26.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DHcnxypw.js 21.7 kB 21.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DhFTK9fY.js 25.1 kB 25.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DlT4t_ui.js 25.9 kB 25.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DRgSrIdD.js 24.2 kB 24.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-tjkeqiZq.js 21.1 kB 21.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

UI Components — 177 kB (baseline 177 kB) • ⚪ 0 B

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/Load3D.vue_vue_type_script_setup_true_lang-CtgYhcJL.js (new) 53.9 kB 🔴 +53.9 kB 🔴 +8.52 kB 🔴 +7.31 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-DpHR-Ruj.js (removed) 53.9 kB 🟢 -53.9 kB 🟢 -8.52 kB 🟢 -7.32 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-CCt3_VCI.js (new) 48.1 kB 🔴 +48.1 kB 🔴 +10.4 kB 🔴 +8.99 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-DmKRvKgE.js (removed) 48.1 kB 🟢 -48.1 kB 🟢 -10.4 kB 🟢 -8.99 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-c7IIpND5.js (removed) 47.3 kB 🟢 -47.3 kB 🟢 -10.6 kB 🟢 -9.3 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-CVB8r-9Z.js (new) 47.3 kB 🔴 +47.3 kB 🔴 +10.6 kB 🔴 +9.29 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-CEtp48gM.js (new) 12.9 kB 🔴 +12.9 kB 🔴 +3.37 kB 🔴 +2.98 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-Dd48hw6h.js (removed) 12.9 kB 🟢 -12.9 kB 🟢 -3.37 kB 🟢 -2.97 kB
assets/ComfyQueueButton-B8Uu_PiX.js (removed) 8.44 kB 🟢 -8.44 kB 🟢 -2.48 kB 🟢 -2.21 kB
assets/ComfyQueueButton-CoxBI1i8.js (new) 8.44 kB 🔴 +8.44 kB 🔴 +2.48 kB 🔴 +2.21 kB
assets/MediaTitle.vue_vue_type_script_setup_true_lang-clVbO-zV.js (new) 897 B 🔴 +897 B 🔴 +502 B 🔴 +445 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-P6FqWlkp.js (removed) 897 B 🟢 -897 B 🟢 -505 B 🟢 -430 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-BPGmgVoN.js 1.34 kB 1.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetButton-CFWrwaAG.js 2.04 kB 2.04 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-6ZIklFyS.js 2.26 kB 2.26 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/keybindingService-BRK1gtxZ.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.84 kB 🔴 +1.58 kB
assets/keybindingService-Dgo4sCLE.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.58 kB
assets/audioService-DaOieo81.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -961 B 🟢 -831 B
assets/audioService-DxlODMKN.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +963 B 🔴 +831 B
assets/serverConfigStore-L3qzi_1Z.js 2.83 kB 2.83 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 2 added / 2 removed

Utilities & Hooks — 3.18 kB (baseline 3.18 kB) • ⚪ 0 B

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-B706rQTW.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +652 B 🔴 +548 B
assets/audioUtils-CxBCUwe0.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -652 B 🟢 -544 B
assets/mathUtil-CD4DsosH.js 1.32 kB 1.32 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeFilterUtil-CXKCRJ-m.js 460 B 460 B ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 1 added / 1 removed

Vendor & Third-Party — 8.56 MB (baseline 8.56 MB) • ⚪ 0 B

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-DJFoH6N_.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-BZV8aGUB.js 3.98 MB 3.98 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-DUTcKlCc.js 1.96 MB 1.96 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-aR6ntw5X.js 1.37 MB 1.37 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-Cmu0_BY4.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-Bz22sFex.js 160 kB 160 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BZLod3g9.js 407 kB 407 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 3.81 MB (baseline 3.81 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/WidgetRecordAudio-Ba2HZZ63.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.24 kB 🔴 +4.64 kB
assets/WidgetRecordAudio-cwadxwTt.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.24 kB 🟢 -4.63 kB
assets/AudioPreviewPlayer-apV87-OC.js (removed) 13.5 kB 🟢 -13.5 kB 🟢 -3.4 kB 🟢 -3.04 kB
assets/AudioPreviewPlayer-kOdWmy5F.js (new) 13.5 kB 🔴 +13.5 kB 🔴 +3.4 kB 🔴 +3.04 kB
assets/WidgetGalleria-7ktHYHCG.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.45 kB 🟢 -1.31 kB
assets/WidgetGalleria-DpKy1IN6.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.45 kB 🔴 +1.31 kB
assets/WidgetColorPicker-8nAtO2Y7.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetColorPicker-ZIwIXQRS.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetMarkdown-BqcAWFnN.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.13 kB
assets/WidgetMarkdown-CoF-Kpvb.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.12 kB
assets/WidgetTextarea-BX0gjERk.js (removed) 2.93 kB 🟢 -2.93 kB 🟢 -1.17 kB 🟢 -1.03 kB
assets/WidgetTextarea-D-Nplp7c.js (new) 2.93 kB 🔴 +2.93 kB 🔴 +1.17 kB 🔴 +1.04 kB
assets/WidgetAudioUI-BS1KMZoI.js (new) 2.85 kB 🔴 +2.85 kB 🔴 +1.16 kB 🔴 +1.06 kB
assets/WidgetAudioUI-Du73PmXb.js (removed) 2.85 kB 🟢 -2.85 kB 🟢 -1.16 kB 🟢 -1.05 kB
assets/WidgetInputText-Be_8cinO.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +914 B 🔴 +843 B
assets/WidgetInputText-Kd3IRRgw.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -917 B 🟢 -856 B
assets/MediaImageBottom-4IXe6BzS.js (new) 1.57 kB 🔴 +1.57 kB 🔴 +740 B 🔴 +650 B
assets/MediaImageBottom-ztk9Ja-w.js (removed) 1.57 kB 🟢 -1.57 kB 🟢 -742 B 🟢 -648 B
assets/MediaAudioBottom-BXiXAdHu.js (removed) 1.52 kB 🟢 -1.52 kB 🟢 -746 B 🟢 -657 B
assets/MediaAudioBottom-tg716bEk.js (new) 1.52 kB 🔴 +1.52 kB 🔴 +744 B 🔴 +656 B
assets/MediaVideoBottom-C7IKzg5i.js (new) 1.52 kB 🔴 +1.52 kB 🔴 +741 B 🔴 +655 B
assets/MediaVideoBottom-Ck2SA-HY.js (removed) 1.52 kB 🟢 -1.52 kB 🟢 -743 B 🟢 -657 B
assets/Media3DBottom-1ptxBeN0.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -734 B 🟢 -653 B
assets/Media3DBottom-uMcxk-IE.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +731 B 🔴 +651 B
assets/Media3DTop-BLDOqIGs.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -767 B 🟢 -653 B
assets/Media3DTop-DKjzmcsr.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +764 B 🔴 +648 B
assets/WidgetSelect-CzEwDiS6.js (new) 655 B 🔴 +655 B 🔴 +341 B 🔴 +290 B
assets/WidgetSelect-premdAlJ.js (removed) 655 B 🟢 -655 B 🟢 -343 B 🟢 -289 B
assets/WidgetInputNumber-BdC8BkBZ.js (new) 595 B 🔴 +595 B 🔴 +328 B 🔴 +276 B
assets/WidgetInputNumber-Dy0YjZoY.js (removed) 595 B 🟢 -595 B 🟢 -330 B 🟢 -283 B
assets/Load3D-BuuMXzPH.js (new) 424 B 🔴 +424 B 🔴 +266 B 🔴 +224 B
assets/Load3D-CshMGOFD.js (removed) 424 B 🟢 -424 B 🟢 -267 B 🟢 -224 B
assets/WidgetLegacy-BbZ3DUmx.js (new) 364 B 🔴 +364 B 🔴 +235 B 🔴 +201 B
assets/WidgetLegacy-CatXcR4T.js (removed) 364 B 🟢 -364 B 🟢 -237 B 🟢 -193 B
assets/commands-_s-RvhJR.js 13.6 kB 13.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BuUILW6P.js 13 kB 13 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BV4R6fLx.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BWp4HdfU.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CLwPdnT6.js 14.2 kB 14.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CWMchBmd.js 15.9 kB 15.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DazTQhtc.js 12.9 kB 12.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DmWrOe93.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwiH7Kr6.js 13.8 kB 13.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-mS3LCNPn.js 14.5 kB 14.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-B1JflQcI.js 72.2 kB 72.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-B2lyXe48.js 114 kB 114 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-B9XEQ-pc.js 94 kB 94 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BErKFzc-.js 73.1 kB 73.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Bf7Tze-u.js 83.4 kB 83.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BhGMcO4Q.js 84.3 kB 84.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CPZUloNQ.js 99 kB 99 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Dva0z-T2.js 86.5 kB 86.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-un0K9wDS.js 81.8 kB 81.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-BPDWO8-i.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-BtY1hGDO.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-ehTZdDBw.js 2.76 kB 2.76 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BC3OlaIn.js 342 kB 342 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BsqN8-W1.js 285 kB 285 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CK2saYDx.js 307 kB 307 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Cm5kR4Hi.js 306 kB 306 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CMrh-uxB.js 310 kB 310 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DlUIOit1.js 369 kB 369 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DNu_xoP2.js 282 kB 282 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DpcvlpZe.js 303 kB 303 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-IyjOYIl-.js 317 kB 317 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-j6EYUdOM.js 2.48 kB 2.48 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-D5bj5c8l.js 2.21 kB 2.21 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetToggleSwitch-DPJMnc2A.js 1.58 kB 1.58 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 17 added / 17 removed

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts (1)

84-93: Critical: Missing startDrag call after setting drag flag.

This code path sets isDraggingVueNodes.value = true when the pointer moves beyond the threshold but never calls startDrag (or safeDragStart). This means the drag flag is set but the drag operation is never actually initiated, which could be the root cause of the stuck-dragging behavior.

Additionally, this is inconsistent with line 80 which correctly uses safeDragStart.

Apply this diff to properly initiate the drag operation:

     if (distance > DRAG_THRESHOLD) {
-      layoutStore.isDraggingVueNodes.value = true
       handleNodeSelect(event, nodeId)
+      safeDragStart(event, nodeId)
     }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3c8def7 and fc8bdc8.

📒 Files selected for processing (1)
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (15)
**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{vue,ts,tsx}: Leverage VueUse functions for performance-enhancing utilities
Use vue-i18n in Composition API for any string literals and place new translation entries in src/locales/en/main.json

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursorrules)

Use es-toolkit for utility functions

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

Use TypeScript for type safety

**/*.{ts,tsx}: Never use any type - use proper TypeScript types
Never use as any type assertions - fix the underlying type issue

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
**/*.{ts,tsx,js,vue}

📄 CodeRabbit inference engine (.cursorrules)

Implement proper error handling in components and services

**/*.{ts,tsx,js,vue}: Use 2-space indentation, single quotes, no semicolons, and maintain 80-character line width as configured in .prettierrc
Organize imports by sorting and grouping by plugin, and run pnpm format before committing

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/*.{vue,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Use camelCase for variable and setting names in TypeScript/Vue files

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx,vue}: Use const settingStore = useSettingStore() and settingStore.get('Comfy.SomeSetting') to retrieve settings in TypeScript/Vue files
Use await settingStore.set('Comfy.SomeSetting', newValue) to update settings in TypeScript/Vue files
Check server capabilities using api.serverSupportsFeature('feature_name') before using enhanced features
Use api.getServerFeature('config_name', defaultValue) to retrieve server feature configuration

Enforce ESLint rules for Vue + TypeScript including: no floating promises, no unused imports, and i18n raw text restrictions in templates

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.ts: Define dynamic setting defaults using runtime context with functions in settings configuration
Use defaultsByInstallVersion property for gradual feature rollout based on version in settings configuration

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/{services,composables}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/{services,composables}/**/*.{ts,tsx}: Use api.apiURL() for backend endpoints instead of constructing URLs directly
Use api.fileURL() for static file access instead of constructing URLs directly

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/{components,composables}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Use vue-i18n for ALL user-facing strings by adding them to src/locales/en/main.json

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
**/composables/use*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables in the format useXyz.ts

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.{vue,ts,js} : Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Use the Vue 3 Composition API instead of the Options API when writing Vue components (exception: when overriding or extending PrimeVue components for compatibility)
🧬 Code graph analysis (1)
src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts (1)
src/renderer/core/layout/store/layoutStore.ts (1)
  • layoutStore (1469-1469)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: setup
  • GitHub Check: collect
  • GitHub Check: test
  • GitHub Check: lint-and-format
🔇 Additional comments (3)
src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts (3)

60-60: Good refactoring, but depends on fixing safeDragStart.

Replacing the direct startDrag call with safeDragStart is the right approach for consistent error handling. However, this depends on fixing the logic issue in safeDragStart (lines 104-110) where the flag is set in the finally block.


80-80: Good use of safe wrapper for consistency.

Using safeDragStart here maintains consistency with the drag initiation pattern. Once the logic issue in safeDragStart is fixed, this will correctly handle the multi-select drag case.


133-135: Correctly allows selection logic to execute after drag ends.

The removal of the early return after safeDragEnd (as mentioned in the AI summary) correctly allows the subsequent selection handling logic (lines 140-145) to execute. This ensures that pointer-up events properly handle both drag completion and selection toggling.

Copy link
Collaborator

@Myestery Myestery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of core drag behaviours are broken here

eg Drag and select at once, selecting one item and holding shift and dragging should drag both items

DrJKL pushed a commit that referenced this pull request Dec 5, 2025
)

## Summary

Fixes an issue where Playwright HTML reports were not being generated
for `chromium-2x`, `chromium-0.5x`, and `mobile-chrome` test runs,
causing 404 errors when accessing report links in PR comments.

## Problem

Only the first report link (chromium) had contents - the other three
browsers returned 404 errors. Investigation revealed that artifacts for
non-chromium browsers were only uploading 1 file (report.json) instead
of the full HTML report with ~32 files.

The root cause was that these browsers run very few tests (1-6 tests
each), and when using `--reporter=html --reporter=json` together,
Playwright would only generate the JSON report without the HTML assets.

## Solution

Changed the workflow for non-chromium browsers to use the same approach
as the sharded chromium tests:
1. Run tests with `--reporter=blob`
2. Generate HTML and JSON reports separately using `merge-reports`

This ensures both HTML and JSON reports are always generated with
complete assets, regardless of test count.

## Testing

The fix can be verified by:
1. Checking that this PR's workflow run uploads similar file counts for
all browsers
2. Confirming all 4 report links are accessible and show proper HTML
content

Related to #7186

🤖 Generated with [Claude Code](https://claude.com/claude-code)

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7193-bugfix-Fix-E2E-test-report-generation-for-non-chromium-browsers-2c06d73d365081ba8ea3ed0d3f5d8d38)
by [Unito](https://www.unito.io)

Co-authored-by: Claude <[email protected]>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts (1)

29-30: Align hasDraggingStarted with successful drag start and shared cleanup

hasDraggingStarted is set in a finally block in safeDragStart, so it becomes true even if startDrag throws. It’s then only reset inside safeDragEnd, not when cleanupDragState is called directly (e.g. from onContextmenu or onScopeDispose). That makes the flag less precise (it doesn’t strictly mean “drag successfully started”) and can leave it out of sync with isDraggingVueNodes.

To keep state coherent and follow the error-handling guideline, I’d suggest:

  • Only setting hasDraggingStarted after a successful startDrag call.
  • Resetting hasDraggingStarted in the same central cleanup that clears isDraggingVueNodes so all cancel/end paths behave consistently.
  • Logging and cleaning up on startDrag errors, similar to safeDragEnd.

Concrete refactor:

-  function cleanupDragState() {
-    layoutStore.isDraggingVueNodes.value = false
-  }
+  function cleanupDragState() {
+    layoutStore.isDraggingVueNodes.value = false
+    hasDraggingStarted = false
+  }
@@
-  function safeDragStart(event: PointerEvent, nodeId: string) {
-    try {
-      startDrag(event, nodeId)
-    } finally {
-      hasDraggingStarted = true
-    }
-  }
+  function safeDragStart(event: PointerEvent, nodeId: string) {
+    try {
+      startDrag(event, nodeId)
+      hasDraggingStarted = true
+    } catch (error) {
+      console.error('Error during startDrag:', error)
+      cleanupDragState()
+    }
+  }
@@
   function safeDragEnd(event: PointerEvent) {
     try {
       const nodeId = toValue(nodeIdRef)
       endDrag(event, nodeId)
     } catch (error) {
       console.error('Error during endDrag:', error)
     } finally {
-      hasDraggingStarted = false
       cleanupDragState()
     }
   }

This keeps the flag meaning “we have an active drag” and ensures all end/cancel paths reset both flags together. This is conceptually similar to the earlier review about not setting the drag flag in a finally block, just with a local flag now.

As per coding guidelines, this also improves explicit error handling around startDrag. Please sanity‑check interaction flows (normal drag, cancelled drag via context menu, scope disposal) after this change with tests or manual QA.

Also applies to: 102-105, 106-112, 114-124

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fc8bdc8 and 8c6255d.

📒 Files selected for processing (1)
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts (5 hunks)
🧰 Additional context used
📓 Path-based instructions (10)
src/**/*.{vue,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/{services,composables}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/{services,composables}/**/*.{ts,tsx}: Use api.apiURL() for backend endpoints instead of constructing URLs directly
Use api.fileURL() for static file access instead of constructing URLs directly

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/{components,composables}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Use vue-i18n for ALL user-facing strings by adding them to src/locales/en/main.json

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript exclusively; no new JavaScript code

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
**/*.{ts,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,vue}: Use camelCase for variable and function names
Indent with 2 spaces (see .prettierrc)
Use single quotes for strings (see .prettierrc)
No trailing semicolons (see .prettierrc)
Maximum line width of 80 characters (see .prettierrc)
Sort and group imports by plugin (run pnpm format before committing)
Never use any type; use proper TypeScript types instead
Never use as any type assertions; fix the underlying type issue instead
Avoid code comments unless absolutely necessary; write expressive, self-documenting code instead
When writing new code, ask if there is a simpler way to introduce the same functionality; if yes, choose the simpler approach
Use refactoring to make complex code simpler
Use es-toolkit for utility functions
Use Vite for fast development and building
Implement proper error handling
Write tests for all changes, especially bug fixes to catch future regressions

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
**/composables/**/use*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables with useXyz.ts pattern

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.{vue,ts,js} : Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Utilize ref and reactive for reactive state
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Use ref/reactive for state management in Vue 3 Composition API
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: deploy-and-comment
  • GitHub Check: setup
  • GitHub Check: lint-and-format
  • GitHub Check: test
  • GitHub Check: collect
🔇 Additional comments (1)
src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts (1)

134-142: Pointer‑up condition change looks correct; ensure it’s covered by tests

The updated condition:

const wasDragging = layoutStore.isDraggingVueNodes.value

if (hasDraggingStarted || wasDragging) {
  safeDragEnd(event)

  if (wasDragging) {
    return
  }
}

nicely distinguishes:

  • “Pre‑drag” cases where startDrag ran but isDraggingVueNodes never flipped to true (we still end the drag but continue on to selection logic).
  • True drag cases (wasDragging === true), where you end the drag and skip the click‑selection behavior.

This aligns with the PR’s goal of not leaving drag state stuck while preserving click selection, assuming the flags are managed consistently.

Given how subtle these transitions are, please ensure you have regression tests (or at least targeted interaction tests) that cover:

  • Click without moving (no visual drag, but startDrag called).
  • Small movement below DRAG_THRESHOLD.
  • Normal drag + drop.
  • Multi‑select drag + drop.

@LittleSound
Copy link
Collaborator Author

selecting one item and holding shift and dragging should drag both items

thanks. I fixed this case.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts (1)

107-113: Critical: Flag set in finally block will execute even on startDrag failure.

Setting hasDraggingStarted = true in the finally block means it will be set even if startDrag throws an error. This could leave the system thinking dragging has started when the operation never initialized, potentially causing the stuck-dragging state this PR aims to fix.

Apply this diff to set the flag only after successful drag start:

 function safeDragStart(event: PointerEvent, nodeId: string) {
   try {
     startDrag(event, nodeId)
+    hasDraggingStarted = true
+  } catch (error) {
+    console.error('Error during startDrag:', error)
+    throw error
   } finally {
-    hasDraggingStarted = true
   }
 }

Alternatively, if you need to guarantee cleanup:

 function safeDragStart(event: PointerEvent, nodeId: string) {
+  hasDraggingStarted = true
   try {
     startDrag(event, nodeId)
+  } catch (error) {
+    console.error('Error during startDrag:', error)
+    hasDraggingStarted = false
+    throw error
   } finally {
-    hasDraggingStarted = true
   }
 }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8c6255d and c904f06.

📒 Files selected for processing (1)
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts (5 hunks)
🧰 Additional context used
📓 Path-based instructions (10)
src/**/*.{vue,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/{services,composables}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/{services,composables}/**/*.{ts,tsx}: Use api.apiURL() for backend endpoints instead of constructing URLs directly
Use api.fileURL() for static file access instead of constructing URLs directly

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
src/**/{components,composables}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Use vue-i18n for ALL user-facing strings by adding them to src/locales/en/main.json

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Use TypeScript exclusively; no new JavaScript code

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
**/*.{ts,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,vue}: Use camelCase for variable and function names
Indent with 2 spaces (see .prettierrc)
Use single quotes for strings (see .prettierrc)
No trailing semicolons (see .prettierrc)
Maximum line width of 80 characters (see .prettierrc)
Sort and group imports by plugin (run pnpm format before committing)
Never use any type; use proper TypeScript types instead
Never use as any type assertions; fix the underlying type issue instead
Avoid code comments unless absolutely necessary; write expressive, self-documenting code instead
When writing new code, ask if there is a simpler way to introduce the same functionality; if yes, choose the simpler approach
Use refactoring to make complex code simpler
Use es-toolkit for utility functions
Use Vite for fast development and building
Implement proper error handling
Write tests for all changes, especially bug fixes to catch future regressions

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
**/composables/**/use*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables with useXyz.ts pattern

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.{vue,ts,js} : Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Utilize ref and reactive for reactive state
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Use ref/reactive for state management in Vue 3 Composition API
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: collect
  • GitHub Check: lint-and-format
  • GitHub Check: setup
  • GitHub Check: test
🔇 Additional comments (3)
src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts (3)

137-142: Verify the pointer-up logic works correctly after fixing the double startDrag issue.

The logic correctly handles drag cleanup and selection toggle, using the captured wasDragging state to decide whether to skip selection handling. However, with the current double startDrag call issue (line 62), hasDraggingStarted will be true even for simple clicks, which may not align with the intended behavior.

Once the double-call issue is resolved, verify that:

  1. Actual drags end properly and skip selection toggle
  2. Threshold-checked drags (below threshold) still allow selection toggle
  3. Multi-select drags behave correctly

115-125: LGTM: Proper error handling and cleanup in safeDragEnd.

The wrapper correctly handles errors from endDrag and ensures state cleanup in the finally block, which is appropriate here since we want to reset drag state regardless of success or failure.


29-29: Consider using ref for consistency with Vue patterns.

While this internal flag doesn't require reactivity, using ref(false) would align with Vue 3 Composition API conventions and the project's learnings about state management.

Apply this diff to use ref:

+import { onScopeDispose, ref, toValue } from 'vue'
-let hasDraggingStarted = false
+const hasDraggingStarted = ref(false)

Then update usage throughout:

-hasDraggingStarted = true
+hasDraggingStarted.value = true

-hasDraggingStarted = false
+hasDraggingStarted.value = false

-if (hasDraggingStarted || wasDragging) {
+if (hasDraggingStarted.value || wasDragging) {
⛔ Skipped due to learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Utilize ref and reactive for reactive state
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Use ref/reactive for state management in Vue 3 Composition API
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.{vue,ts,js} : Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.{vue,ts,js} : Use useIntersectionObserver for visibility detection instead of custom scroll handlers

startPosition.value = { x: event.clientX, y: event.clientY }

startDrag(event, nodeId)
safeDragStart(event, nodeId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical: startDrag called twice with changed selection between calls.

The current flow calls safeDragStart in both onPointerdown (line 62) and onPointermove (line 83), with handleNodeSelect (line 82) potentially modifying the selection between calls. As noted in previous reviews, startDrag reinitializes draggingNodeIds from the current selectedNodeIds each time, meaning the second call captures a different selection than the first.

This breaks the expected behavior where drag state should capture the selection at drag initiation, not mid-operation.

Remove the premature safeDragStart call from onPointerdown. The drag should only be initialized when actual dragging begins (after movement threshold is met or on first multi-select move):

 function onPointerdown(event: PointerEvent) {
   // ... existing checks ...
   startPosition.value = { x: event.clientX, y: event.clientY }
-
-  safeDragStart(event, nodeId)
 }

Then ensure both drag paths in onPointermove call safeDragStart before setting isDraggingVueNodes:

 if (lmbDown && multiSelect && !layoutStore.isDraggingVueNodes.value) {
+  safeDragStart(event, nodeId)
   layoutStore.isDraggingVueNodes.value = true
   handleNodeSelect(event, nodeId)
-  safeDragStart(event, nodeId)
   return
 }

 if (lmbDown && !layoutStore.isDraggingVueNodes.value) {
   const dx = event.clientX - startPosition.value.x
   const dy = event.clientY - startPosition.value.y
   const distance = Math.sqrt(dx * dx + dy * dy)

   if (distance > DRAG_THRESHOLD) {
+    safeDragStart(event, nodeId)
     layoutStore.isDraggingVueNodes.value = true
     handleNodeSelect(event, nodeId)
   }
 }

Also applies to: 83-83

🤖 Prompt for AI Agents
In src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.ts
around lines 62 and 83, the code calls safeDragStart twice (once in
onPointerdown at line 62 and again in onPointermove at line 83), allowing
handleNodeSelect to change selection between calls and causing startDrag to
capture the wrong selection; remove the safeDragStart call from onPointerdown so
drag initialization only happens once when actual dragging begins, and update
onPointermove so both drag-start code paths invoke safeDragStart immediately
before setting isDraggingVueNodes (ensuring safeDragStart runs only at true drag
start and after selection changes are finalized).

@Myestery
Copy link
Collaborator

Myestery commented Dec 9, 2025

Looks good, can you confirm the combo widget failing test is not related?

@christian-byrne
Copy link
Contributor

Looks good, can you confirm the combo widget failing test is not related?

I can confirm by nature of seeing this fail on other PRs today.

Copy link
Contributor

@christian-byrne christian-byrne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@christian-byrne christian-byrne merged commit 82fc961 into main Dec 9, 2025
26 of 27 checks passed
@christian-byrne christian-byrne deleted the rizumu/fix/mouse-accidentally-sticks-and-drag-the-node branch December 9, 2025 08:01
Enferlain pushed a commit to Enferlain/ComfyUI_frontend that referenced this pull request Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants